<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<CodeSmackdown.Web.Models.UserAccountModel>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">Account Details</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <h2><%= Html.Encode(ViewData.Model.User.DisplayName) %></h2>
    <p>Contact: <%= Html.Encode(ViewData.Model.User.Email) %></p>
    <p>Total votes: <%= ViewData.Model.VoteCount %></p>
    <h3>Submitted Snippets</h3>
    <div class="snippet-list">
        <% foreach (var snippet in ViewData.Model.SubmittedSnippets) { %>
        <div class="snippet-item"><%= Html.ActionLink(snippet.Title, "ViewSnippet", "Home", new { snippetID = snippet.SnippetID }, new {}) %></div>
        <% } %>
    </div>
    <h3>Submitted Comments</h3>
    <div class="snippet-list">
        <% foreach (var comment in ViewData.Model.SubmittedComments) { %>
        <span class="comment-link">(<%= Html.ActionLink(comment.Snippet.Title, "ViewSnippet", "Home", new { snippetID = comment.SnippetID }, new {}) %>)</span>
        <div class="comment-body"><%= comment.Body  %></div>
        <% } %>
    </div>
    <div style="clear: both; float: none;"></div>
</asp:Content>
